package com.shensi.api.admin.client.customer;

import com.shensi.api.admin.client.fallback.customer.CustomerCardRecordRechargeClientFallBack;
import com.shensi.api.admin.domian.customer.dto.CustomerCardRecordRechargeDto;
import com.shensi.common.core.constant.CloudConstant;
import com.shensi.common.core.domain.AjaxResult;
import com.shensi.common.core.page.TableDataInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: budian
 * @since: 2023/11/30
 */
@FeignClient(
        value = CloudConstant.ADMIN_SERVER,
        fallbackFactory = CustomerCardRecordRechargeClientFallBack.class)
@Component
public interface CustomerCardRecordRechargeClient {

    @GetMapping("/customer/recharge/list")
    public TableDataInfo list(@SpringQueryMap CustomerCardRecordRechargeDto customerCardRecordRecharge);

    /**
     * 导出客户电子会员卡充值记录列表
     */
    @GetMapping("/customer/recharge/export")
    public AjaxResult export(@SpringQueryMap CustomerCardRecordRechargeDto customerCardRecordRecharge);

    /**
     * 获取客户电子会员卡充值记录详细信息
     */
    @GetMapping(value = "/customer/recharge/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id);

    /**
     * 新增客户电子会员卡充值记录
     */
    @PostMapping("/customer/recharge")
    public AjaxResult add(@RequestBody CustomerCardRecordRechargeDto customerCardRecordRecharge);

    /**
     * 修改客户电子会员卡充值记录
     */
    @PutMapping("/customer/recharge")
    public AjaxResult edit(@RequestBody CustomerCardRecordRechargeDto customerCardRecordRecharge);

    /**
     * 删除客户电子会员卡充值记录
     */
    @DeleteMapping("/customer/recharge/{ids}")
    public AjaxResult remove(@PathVariable("ids") Long[] ids);

    /**
     * 获取客户电子会员卡充值汇总金额
     */
    @GetMapping(value = "/customer/recharge/czAmtQuery")
    public AjaxResult czAmtQuery(@SpringQueryMap CustomerCardRecordRechargeDto customerCardRecordRecharge);


    /**
     * 获取客户电子会员卡消费汇总折线图消费数据
     */
    @GetMapping(value = "/customer/recharge/listQydataCZ")
    public TableDataInfo listQydataCZ(@SpringQueryMap CustomerCardRecordRechargeDto customerCardRecordRecharge);

    @GetMapping("/customer/recharge/selectCardDetail")
    public TableDataInfo selectCardDetail(@SpringQueryMap CustomerCardRecordRechargeDto customerCardRecordRecharge);

    @GetMapping(value = "/customer/recharge/listCZData")
    public AjaxResult listCZData(@SpringQueryMap CustomerCardRecordRechargeDto customerCardRecordRecharge);
}
